FROM greencloudcomputing/nodejs14 AS web_builder
WORKDIR /build
COPY ./ .
RUN cd /build &&  npm --registry https://registry.npm.taobao.org install && npm run build 

FROM nginx:stable-alpine
LABEL Dockerfile="liuyang@umxwe.com"
RUN echo -e http://mirrors.ustc.edu.cn/alpine/v3.7/main/ > /etc/apk/repositories
RUN cat /etc/apk/repositories
RUN apk add  --update curl && rm -rf /var/cache/apk/*
COPY docker/nginx.conf /etc/nginx/nginx.conf
COPY --from=web_builder /build/dist /usr/share/nginx/html/